/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package utn.tsb.tej.world_logic;

import java.io.Serializable;
import java.util.logging.Level;
import java.util.logging.Logger;
import csm.uttils.generics.Roster;

/**
 *
 * @author Administrador
 */
public class Continent extends Card implements Serializable {

    private Roster<Country> countries;
    private int armiesReward;

    public int getArmiesReward() {
        return armiesReward;
    }

    public void setArmiesReward(int armiesReward) {
        this.armiesReward = armiesReward;
    }

    public Continent() {
        super();
        this.countries = new Roster<Country>();
        armiesReward = 0;

    }

    public Continent(String name, CardType type, Roster<Country> countries, int armiesReward) {
        super(name, type);
        this.countries = countries;
        this.armiesReward = armiesReward;
    }

    public Roster<Country> getCountries() {
        return countries;
    }

    public void setCountries(Roster<Country> countries) {
        this.countries = countries;
    }

    public boolean containsCountry(Country country){
        boolean contains = false;
        if (countries.indexOf(country) != -1) {
            contains = true;
        }
        return contains;

    }

    @Override
    public String toString() {
        return name + ", " + type.getTypeName() + ", " + armiesReward + " armies reward";




    }
}
